package com.zimmur.dao.order;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.zimmur.model.goods.OrderServiceParam;
import com.zimmur.model.order.OrderService;
import com.zimmur.model.order.view.CustomerServiceView;

public interface IOrderServiceDao {

    int deleteByPrimaryKey(Long serviceid);

    int insertSelective(OrderService record);

    OrderService selectByPrimaryKey(Long serviceid);

    int updateByPrimaryKeySelective(OrderService record);
    
    int updateByOrderId(OrderService record);
    /**
     * 分页查询
     * 通过userId
     * @param user
     * @return
     */
    List<OrderService> selectByUserIdList(@Param("pageBeginNo")Integer pageBeginNo,@Param("pageSize")Integer pageSize,
    		@Param("userId")Long userId,@Param("serviceStatus")String serviceStatus,@Param("time")int time,@Param("keyword")String keyword);
    /**
     * 统计数量
     * 通过userId和订单type查询售后单 
     * @param user
     * @return
     */
    int selectByUserIdCount(@Param("userId")long userId);

	/**
	* <p>Title: queryByServerIdAndOrderId</p>
	* <p>Description: 根据售后单号与订单号查询售后单信息</p>
	* @param serviceId
	* @param orderId
	* @return
	*/
	OrderService selectByServerIdAndOrderId(@Param("serviceId")Long serviceId,@Param("orderId") Long orderId);
	/**
	* <p>Title: countByParam</p>
	* <p>Description: 分页查询售后单列表</p>
	* @param param
	* @return
	*/
	int countByParam(@Param("param")OrderServiceParam param);

	/**
	* <p>Title: readByMuchParams</p>
	* <p>Description: </p>
	* @param param
	* @return
	*/
	List<CustomerServiceView> readByMuchParams(@Param("param")OrderServiceParam param);

	/**
	* <p>Title: selectCustServiceDetail</p>
	* <p>Description: 查询售后单详情</p>
	* @param serviceId
	* @param orderId
	* @return
	*/
	OrderService selectCustServiceDetail(@Param("serviceId")Long serviceId);
}